Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Application Messages


GXStartPage

QuickDraw GX sends the GXStartPage message to start a new page in the spool file. You can override the GXStartPage message to perform any initialization your printing extension or printer driver requires before printing each page. Your override of the GXStartPage message must match the following formal declaration:

OSErr MyStartPage (gxFormat aFormat, long numViewPorts,
                   gxViewPort *viewPortList);
aFormat
The format object for the page.
numViewPorts
The number of view ports pointed to by the viewPortList parameter.
viewPortList
A pointer to a list of view ports to use to capture shapes.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends this message when an application calls the GXStartPage function to start a new page. The application calls the GXStartPage and GXFinishPage functions once for each page, which causes QuickDraw GX to send the GXStartPage and GXFinishPage messages. The GXStartPage message begins a new page in the spool file and prepares to capture all data drawn to the view ports in the viewPortList parameter so that this data can be redirected to the new page.

You need to override this message if you want to initialize information when an application begins printing each page. You can also override this message to determine when a new page is being spooled.

The default implementation of GXStartPage installs view port filters on the requested view ports to begin capturing graphics objects.

SPECIAL CONSIDERATIONS
You never send the GXStartPage message yourself.

You must forward the GXStartPage message to other message handlers so that they can override it. If your override fails, you need to call the GXCleanupStartPage function to notify other handlers of the failure. If another handler returns an error, you must undo anything that you've done and return the same error.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The GXStartPage and GxFinishPage functions are described in Inside Macintosh: QuickDraw GX Printing.

The GXCleanupStartPage function is described on page 5-37 in the chapter "Printing Functions for Message Overrides."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help